;
; Adaptado para ser montado pelo SJASMPLUS. Unificado codigo do MSX2 e MSX2+
; Usado constantes para os numeros de portas de I/O
; por Fabio Belavenuto e Leonard Oliveira @ 2014
;

JF37D		= $F37D		; BDOS routine for diskbasic
VARWRK		= $F380
xLOW		= $F406
LOWx		= $F406
HIGHx		= $F408
HEADER		= $F40A
ERRFLG		= $F414
LPTPOS		= $F415
PRTFLG		= $F416
NTMSXP		= $F417
RAWPRT		= $F418
VLZADR		= $F419
VLZDAT		= $F41B
CURLIN		= $F41C
KBFMIN		= $F41E
KBUF		= $F41F
BUFMIN		= $F55D
BUF			= $F55E
ENDBUF		= $F660
TTYPOS		= $F661
DIMFLG		= $F662
VALTYP		= $F663
DORES		= $F664
DONUM		= $F665
CONTXT		= $F666
CONSAV		= $F668
CONTYP		= $F669
CONLO		= $F66A
MEMSIZ		= $F672
STKTOP		= $F674
TXTTAB		= $F676
TEMPPT		= $F678
TEMPST		= $F67A
DSCTMP		= $F698
FRETOP		= $F69B
TEMP3		= $F69D
TEMP8		= $F69F
ENDFOR		= $F6A1
DATLIN		= $F6A3
SUBFLG		= $F6A5
FLGINP		= $F6A6
TEMP		= $F6A7
PTRFLG		= $F6A9
AUTFLG		= $F6AA
AUTLIN		= $F6AB
AUTINC		= $F6AD
SAVTXT		= $F6AF
SAVSTK		= $F6B1
ERRLIN		= $F6B3
DOT			= $F6B5
ERRTXT		= $F6B7
ONELIN		= $F6B9
ONEFLG		= $F6BB
TEMP2		= $F6BC
OLDLIN		= $F6BE
OLDTXT		= $F6C0
VARTAB		= $F6C2
ARYTAB		= $F6C4
STREND		= $F6C6
DATPTR		= $F6C8
DEFTBL		= $F6CA
PRMSTK		= $F6E4
PRMLEN		= $F6E6
PARM1		= $F6E8
PRMPRV		= $F74C
PRMLN2		= $F74E
PARM2		= $F750
PRMFLG		= $F7B4
ARYTA2		= $F7B5
NOFUNS		= $F7B7
TEMP9		= $F7B8
FUNACT		= $F7BA
SWPTMP		= $F7BC
TRCFLG		= $F7C4
FBUFFR		= $F7C5
DECTMP		= $F7F0
DECTM2		= $F7F2
DECCNT		= $F7F4
DAC			= $F7F6
HOLD8		= $F806
ARG			= $F847
RNDX		= $F857
MAXFIL		= $F85F
FILTAB		= $F860
NULBUF		= $F862
PTRFIL		= $F864
FILNAM		= $F866
FILNM2		= $F871
NLONLY		= $F87C
SAVEND		= $F87D
FNKSTR		= $F87F
CGPNT		= $F91F
NAMBAS		= $F922
CGPBAS		= $F924
PATBAS		= $F926
ATRBAS		= $F928
CLOC		= $F92A
CMASK		= $F92C
MINDEL		= $F92D
MAXDEL		= $F92F
ASPECT		= $F931
CENCNT		= $F933
CLINEF		= $F935
CNPNTS		= $F936
CPLOTF		= $F938
CPCNT		= $F939
CPCNT8		= $F93B
CRCSUM		= $F93D
CSTCNT		= $F93F
CSCLXY		= $F941
CSAVEA		= $F942
CSAVEM		= $F944
CXOFF		= $F945
CYOFF		= $F947
LOHMSK		= $F949
LOHDIR		= $F94A
LOHADR		= $F94B
LOHCNT		= $F94D
SKPCNT		= $F94F
MOVCNT		= $F951
PDIREC		= $F953
LFPROG		= $F954
RTPROG		= $F955
MCLTAB		= $F956
MCLFLG		= $F958
QUETAB		= $F959
QUEBAK		= $F971
VOICAQ		= $F975
DPPAGE		= $FAF5
ACPAGE		= $FAF6
AVCSAV		= $FAF7
EXBRSA		= $FAF8
CHRCNT		= $FAF9
ROMA		= $FAFA
MODE		= $FAFC	; b0	= SHIFT KANA mode
					; b1-b2	= VRAM Size
					; b3	= use fast vdp transfer in MSX1 screens
					; b4	= 212/256 lines
					; b5	= screen 11
					; b6	= JIS2 rom
					; b7	= upcase status SHIFT KANA mode
XSAVE		= $FAFE
YSAVE		= $FB00
LOGOPR		= $FB02
HOKVLD		= $FB20
PRSCNT		= $FB35
SAVSP		= $FB36
VOICEN		= $FB38
SAVVOL		= $FB39
MCLLEN		= $FB3B
MCLPTR		= $FB3C
QUEUEN		= $FB3E
MUSICF		= $FB3F
PLYCNT		= $FB40
VCBA		= $FB41
VCBB		= $FB66
VCBC		= $FB8B
ENSTOP		= $FBB0
BASROM		= $FBB1
LINTTB		= $FBB2
FSTPOS		= $FBCA
CURSAV		= $FBCC
FNKSWI		= $FBCD
FNKFLG		= $FBCE
ONGSBF		= $FBD8
CLIKFL		= $FBD9
OLDKEY		= $FBDA
NEWKEY		= $FBE5
KEYBUF		= $FBF0
LINWRK		= $FC18
PATWRK		= $FC40
BOTTOM		= $FC48
HIMEM		= $FC4A
TRPTBL		= $FC4C
INTFLG		= $FC9B
PADY		= $FC9C
PADX		= $FC9D
JIFFY		= $FC9E
INTVAL		= $FCA0
INTCNT		= $FCA2
LOWLIM		= $FCA4
WINWID		= $FCA5
GRPHED		= $FCA6
ESCCNT		= $FCA7
INSFLG		= $FCA8
CSRSW		= $FCA9
CSTYLE		= $FCAA
CAPST		= $FCAB
KANAST		= $FCAC
KANAMD		= $FCAD
FLBMEM		= $FCAE
SCRMOD		= $FCAF
OLDSCR		= $FCB0
CASPRV		= $FCB1
BDRATR		= $FCB2
GXPOS		= $FCB3
GYPOS		= $FCB5
GRPACX		= $FCB7
GRPACY		= $FCB9
DRWFLG		= $FCBB
DRWSCL		= $FCBC
DRWANG		= $FCBD
RUNBNF		= $FCBE
SAVENT		= $FCBF
EXPTBL		= $FCC1
SLTTBL		= $FCC5
SLTATR		= $FCC9
SLTWRK		= $FD09
PROCNM		= $FD89
DEVICE		= $FD99
H.KEYI		= $FD9A
H.TIMI		= $FD9F
H.CHPU		= $FDA4
H.DSPC		= $FDA9
H.ERAC		= $FDAE
H.DSPF		= $FDB3
H.ERAF		= $FDB8
H.TOTE		= $FDBD
H.CHGE		= $FDC2
H.INIP		= $FDC7
H.KEYC		= $FDCC
H.KEYA		= $FDD1
H.NMI		= $FDD6
H.PINL		= $FDDB
H.QINL		= $FDE0
H.INLI		= $FDE5
H.ONGO		= $FDEA
H.DSKO		= $FDEF
H.SETS		= $FDF4
H.NAME		= $FDF9
H.KILL		= $FDFE
H.IPL		= $FE03
H.COPY		= $FE08
H.CMD		= $FE0D
H.DSKF		= $FE12
H.DSKI		= $FE17
H.ATTR		= $FE1C
H.LSET		= $FE21
H.RSET		= $FE26
H.FIEL		= $FE2B
H.MKIS		= $FE30
H.MKSS		= $FE35
H.MKDS		= $FE3A
H.CVI		= $FE3F
H.CVS		= $FE44
H.CVD		= $FE49
H.GETP		= $FE4E
H.SETF		= $FE53
H.NOFO		= $FE58
H.NULO		= $FE5D
H.NTFL		= $FE62
H.MERG		= $FE67
H.SAVE		= $FE6C
H.BINS		= $FE71
H.BINL		= $FE76
H.FILE		= $FE7B
H.DGET		= $FE80
H.FILO		= $FE85
H.INDS		= $FE8A
H.RSLF		= $FE8F
H.SAVD		= $FE94
H.LOC		= $FE99
H.LOF		= $FE9E
H.EOF		= $FEA3
H.FPOS		= $FEA8
H.BAKU		= $FEAD
H.PARD		= $FEB2
H.NODE		= $FEB7
H.POSD		= $FEBC
H.GEND		= $FEC6
H.RUNC		= $FECB
H.CLEA		= $FED0
H.LOPD		= $FED5
H.STKE		= $FEDA
H.ISFL		= $FEDF
H.OUTD		= $FEE4
H.CRDO		= $FEE9
H.DSKC		= $FEEE
H.DOGR		= $FEF3
H.PRGE		= $FEF8
H.ERRP		= $FEFD
H.ERRF		= $FF02
H.READ		= $FF07
H.MAIN		= $FF0C
H.DIRD		= $FF11
H.FINI		= $FF16
H.FINE		= $FF1B
H.CRUN		= $FF20
H.CRUS		= $FF25
H.ISRE		= $FF2A
H.NTFN		= $FF2F
H.NOTR		= $FF34
H.SNGF		= $FF39
H.NEWS		= $FF3E
H.GONE		= $FF43
H.CHRG		= $FF48
H.RETU		= $FF4D
H.PRTF		= $FF52
H.COMP		= $FF57
H.FINP		= $FF5C
H.TRMN		= $FF61
H.FRME		= $FF66
H.NTPL		= $FF6B
H.EVAL		= $FF70
H.MDIN		= $FF75
H.OKNO		= $FF75
H.FING		= $FF7A
H.ISMI		= $FF7F
H.WIDT		= $FF84
H.LIST		= $FF89
H.BUFL		= $FF8E
H.MDTM		= $FF93
H.FRQI		= $FF93
H.SCNE		= $FF98
H.FRET		= $FF9D
H.PTRG		= $FFA2
H.PHYD		= $FFA7
H.FORM		= $FFAC
H.ERRO		= $FFB1
H.LPTO		= $FFB6
H.LPTS		= $FFBB
H.SCRE		= $FFC0
H.PLAY		= $FFC5
EXTBIO		= $FFCA
RG8SAV		= $FFE7
RG9SAV		= $FFE8
RG10SA		= $FFE9
RG11SA		= $FFEA
RG18SA		= $FFF1
RG23SA		= $FFF6
D.FFF7		= $FFF7	; slotid of mainrom
D.FFF8		= $FFF8
RG24SA		= $FFF9
RG25SA		= $FFFA
RG26SA		= $FFFB
D.FFFD		= $FFFD	; used to store SP register during CPU change
D.FFFF		= $FFFF
